const AUDIT_WEB_SERVER = process.env.AUDIT_WEB_SERVER;
const AUDIT_API_SERVER = process.env.AUDIT_API_SERVER;
const API_PREFIX = "/consoleApi/audit";
const APIV1 = AUDIT_API_SERVER + API_PREFIX;

const USER_CENTER_SERVER = process.env.USER_CENTER_SERVER;
const USER_CENTER_URL = `${USER_CENTER_SERVER}/auth.do?type=audit&callback=` + encodeURIComponent(`${AUDIT_WEB_SERVER}/`);
const USER_CENTER_LOGOUT_URL = `${USER_CENTER_SERVER}/removeAuthToken.do?type=audit&callback=` + encodeURIComponent(`${AUDIT_WEB_SERVER}/`);

module.exports = {
  name: 'StarCharge Audit Center',
  prefix: 'auditCenter',
  footerText: 'Ant Design Admin  © 2017 StarCharge Audit Center',
  logo: '/logo.png',
  iconFontCSS: '/iconfont.css',
  iconFontJS: '/iconfont.js',
  CORS: [AUDIT_API_SERVER],
  openPages: ['/'],
  apiPrefix: API_PREFIX,
  USER_CENTER_URL,
  USER_CENTER_LOGOUT_URL,
  APIV1,
  systemLogs: [{
    application: 'APP',
    logger: 'app-ccchong-com'
  }, {
    application: '结算',
    logger: 'cms-ccchong-com'
  }, {
    application: '微信',
    logger: 'wx-ccchong-com'
  }, {
    application: 'IOT1',
    logger: 'iot1-ccchong-com'
  }, {
    application: 'IOT2',
    logger: 'iot2-ccchong-com'
  }, {
    application: 'OPEN',
    logger: 'open-starcharge-com'
  }, {
    application: '互联互通',
    logger: 'dxp-starcharge-com'
  }, {
    application: '数据中心',
    logger: 'dw-starcharge-com'
  }],
  systemLogsForSdk: [
  //     {
  //   application: 'APP',
  //   logger: 'app-ccchong-com'
  // }, {
  //   application: '结算',
  //   logger: 'cms-ccchong-com'
  // }, {
  //   application: '微信',
  //   logger: 'wx-ccchong-com'
  // },
      {
    application: 'IOT',
    logger: 'iot-ccchong-com'
  }
      // , {
  //   application: 'OPEN',
  //   logger: 'open-starcharge-com'
  // }, {
  //   application: '互联互通',
  //   logger: 'dxp-starcharge-com'
  // }, {
  //   application: '数据中心',
  //   logger: 'dw-starcharge-com'
  // }
  ],
  api: {
    systemModule: {
      listMenusApi: `${APIV1}/listMenu`,
      saveMenuApi: `${APIV1}/saveMenu`,
      updateMenuApi: `${APIV1}/updateMenu`,
      removeMenuApi: `${APIV1}/removeMenu`,
    },
    userModule: {
      checkTokenApi: `${APIV1}/tokenCheck`,
      userListApi: `${APIV1}/listUser`,
      addUserApi: `${APIV1}/addUser`,
      updateUserApi: `${APIV1}/updateUser`,
      getUserApi: `${APIV1}/getUser`,
      listUserMenuApi: `${APIV1}/listUserMenu`,
      listUserSelectedMenuApi: `${APIV1}/listUserSelectedMenu`,
      updateUserMenuApi: `${APIV1}/updateUserMenu`
    },
    settlementModule: {
      bizAuditListApi: `${APIV1}/summary`,
      bizAuditLogListApi: `${APIV1}/logList`,
      jobAuditListApi: `${APIV1}/taskList`
    },
    logModule: {
      logSummaryApi: `${APIV1}/aliLogSummary`,
      logListApi: `${APIV1}/aliLogList`,
      listLogstoreApi: `${APIV1}/aliListLogstore`,
      getLogsApi: `${APIV1}/aliGetLogs`
    },
    groupModule: {
      findGroupsApi: `${APIV1}/findGroups`,
      loadGroupApi: `${APIV1}/loadGroup`,
      saveGroupApi: `${APIV1}/saveGroup`,
      updateGroupNameApi: `${APIV1}/updateGroupName`,
      updateGroupStatusApi: `${APIV1}/updateGroupStatus`,
      allUsersApi: `${APIV1}/allUsers`,
      leftUsersApi: `${APIV1}/leftUsers`,
      selectedUsersApi: `${APIV1}/selectedUsers`,
      listUserGroupsApi: `${APIV1}/listUserGroups`,
      bindGroupUsersApi: `${APIV1}/bindGroupUsers`
    },
    aliyunLogNotifyTagModule: {
      listAliyunLogProjectsApi: `${APIV1}/listAliyunLogProjects`,
      listAliyunLogLogStoresApi: `${APIV1}/listAliyunLogLogStores`,
      findAliyunLogTagsApi: `${APIV1}/findAliyunLogTags`,
      addAliyunLogTagApi: `${APIV1}/addAliyunLogTag`,
      updateAliyunLogTagApi: `${APIV1}/updateAliyunLogTag`,
      deleteAliyunLogTagApi: `${APIV1}/deleteAliyunLogTag`
    },
    notifySettingModule: {
      findNotifySettingsApi: `${APIV1}/findNotifySettings`,
      saveNotifySettingForErrorLogApi: `${APIV1}/saveNotifySettingForErrorLog`,
      saveNotifySettingForTaskApi: `${APIV1}/saveNotifySettingForTask`,
      deleteNotifySettingApi: `${APIV1}/deleteNotifySetting`,
      refreshNotifySettingCacheApi: `${APIV1}/refreshNotifySettingCache`
    },
    taskNotifyModule: {
      findTasksApi: `${APIV1}/findTasks`,
      getTaskDetailApi: `${APIV1}/getTaskDetail`,
      saveTaskTypeApi: `${APIV1}/saveTaskType`,
      updateTaskInfoApi: `${APIV1}/updateTaskInfo`,
      updateTaskStatusApi: `${APIV1}/updateTaskStatus`
    },
    dataCenterModule: {},
    appModule: {}
  }
}